//
//  AppPlugin+App.swift
//  Runner
//
//  Created by YMac on 2022/7/14.
//  Copyright © 2022 The Chromium Authors. All rights reserved.
//

extension AppPlugin {
    static func doApp(_ method:String, _ arguments:NSDictionary, _ result:FlutterResult) -> Bool {
        switch method {
        case "goHome":
            return true
        case "getSchemeData":
            let data = AppDelegate.schemeData?.absoluteString
            AppDelegate.schemeData = nil
            result([
                "data": data,
            ])
            return true
        default: return false
        }
    }
}
